package com.beerandjesus.sportofkings.handicapper.factory;

import com.beerandjesus.sportofkings.handicapper.model.ResultsTable;
import com.beerandjesus.sportofkings.handicapper.model.RaceType;
import com.beerandjesus.sportofkings.handicapper.model.HorseAnalysisResult;
import com.beerandjesus.sportofkings.handicapper.model.RaceAnalysisResultVO;

import java.util.List;

/**
 * Date: Jul 17, 2012
 * Time: 12:06:13 AM
 */
public interface ResultsTableFactory {

    public static final String SIRE_TRAINER_WORKOUTS = "STW";
    public static final String STARTS = "STARTS";
    public static final String SPEED = "SPEED";
    public static final String Q_PTS = "Q PTS";
    public static final String UP_CLOSE = "UP CLOSE";
    public static final String W_OFF_PACE = "W OFF PACE";
    public static final String WPS = "WPS";
    public static final String WORKS = "WORKS";
    public static final String NAME = "NAME";
    public static final String MORNING_LINE = "M/L";
    public static final String AUCTION_PRICE_STUD_FEE = "ACTN/STUD";

    public static final String[] NON_MAIDEN_TABLE_HEADERS = new String[] {
        Q_PTS, UP_CLOSE, W_OFF_PACE, SPEED, WPS, WORKS, NAME, MORNING_LINE
    };
    public static final String[] MAIDEN_TABLE_HEADERS = new String[] {
		STARTS, SIRE_TRAINER_WORKOUTS, SPEED, NAME, MORNING_LINE, AUCTION_PRICE_STUD_FEE
	};

    /**
     * Get a new ResultsTable appropriate to a given RaceType
     * @param raceType The RaceType. Cannot be null.
     * @return A new ResultsTable initialized for the given RaceType
     */
    ResultsTable newResultsTable(RaceType raceType);

    /**
     * Get a new ResultsTable filled with data from a given list of
     * analysis results.
     * @param raceType The race type. Cannot be null.
     * @param results The list of analysis results. Every result must match
     *              the RaceType (maiden or non-maiden).
     * @return A new ResultsTable containing the anlysis results.
     */
    ResultsTable newResultsTable(RaceType raceType, List<HorseAnalysisResult> results);

    /**
     * Get a simple String representation of a full card of races
     * provided as a list of RaceAnalysisResultVO objects.
     * @param races A list of races
     * @return A String representation of the card in simple format
     */
    String getOutputSimpleFormat(List<RaceAnalysisResultVO> races);
}
